/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 */

import React from 'react';
import {
  StatusBar,
  StyleSheet,

} from 'react-native';

import { SafeAreaProvider } from 'react-native-safe-area-context';

//导航容器
import { NavigationContainer } from '@react-navigation/native';
//创建路由管理器
import { createStackNavigator } from '@react-navigation/stack';
import Welcome from './src/modules/welcome/welcome';
import Login from './src/modules/login/login';
import MainTab from './src/modules/mainTab/MainTab';

function App(): JSX.Element {
  const Stack = createStackNavigator();
  return (
    <SafeAreaProvider >
      <StatusBar
        barStyle={ 'dark-content'}
        backgroundColor={'white'}
      />
      <NavigationContainer>
        <Stack.Navigator
        initialRouteName='Welcome'
        >
            <Stack.Screen 
            name='Welcome'
            component={Welcome}
            options={{
              headerShown: false
            }}
            />
             <Stack.Screen 
            name='Login'
            component={Login}
            options={{
              headerShown: false
            }}
            />
             <Stack.Screen 
            name='MainTab'
            component={MainTab}
            options={{
              headerShown: false
            }}
            />
      </Stack.Navigator>
      </NavigationContainer>
    </SafeAreaProvider>
  );
}

const styles = StyleSheet.create({
  
});

export default App;
